from flask import jsonify, Blueprint
from app.utils.Result import Result

api = Blueprint('api', __name__)

@api.route('/get_user/<int:user_id>')
def get_user(user_id):
    user = {'id': user_id, 'username': 'Alice'}

    if user:
        result = Result.success(data=user, message='User found')
    else:
        result = Result.fail(message='User not found', code=404)

    return jsonify(result.to_dict())
